FROM hub.oepkgs.net/openeuler/openeuler:24.03-lts

RUN dnf install -y fontconfig-devel java-1.8.0-openjdk net-tools unzip glibc-langpack-zh glibc-locale-source &&\
    dnf clean all

# 生成 zh_CN.UTF-8 locale
RUN localedef -i zh_CN -f UTF-8 zh_CN.UTF-8
# 中文字体
ADD ./SourceHanSerifCN.zip  /usr/share/fonts/
RUN unzip /usr/share/fonts/SourceHanSerifCN.zip -d /usr/share/fonts/ && \
    rm /usr/share/fonts/SourceHanSerifCN.zip &&\
    fc-cache -fv &&\
    ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
    echo "Asia/Shanghai" > /etc/timezone

# 设置环境变量
ENV LC_ALL="zh_CN.UTF-8"
ENV LANG="zh_CN.UTF-8"